// import utils from "../../utils/utils";

Page({
  data: {
    notifyList: []
  },
  onLoad() {
    // wx.utils.toast()
    // const res = await wx.http.get('/announcement')
    // console.log(res);
    this.getNotifyList()
    // console.log(getApp().token);
  },
  // 获取列表数据
  async getNotifyList() {
    const { code, data } = await wx.http.get('/announcement')
    if (code !== 10000) return wx.utils.toast()
    this.setData({
      notifyList: data
    })
    // console.log(data);
  }
})
